<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <style>
        *{margin:0;padding:0;}
        .table{
            text-align: center;
            width:400px;
            border:1px solid #333;
        }
        .active{
            color:orangered;
        }
        input{
            width:80%;
            height: 40px;
            margin-top: 20px;
        }
        li{
            list-style: none;
            display: inline-block;
            cursor: pointer;
            margin-right: 50px;
        }
        .content{
            position: relative;
            height:400px;
        }
        .nav{
            height: 50px;
            line-height: 50px;
            border-bottom: 1px solid #333;
        }
        /* cor */
        .content>div{
            position: absolute;
            width:100%;height:100%;left:0;top:0;
        }
        .saoma{
            display: none;
        }
        img{
            margin-top:20px;
        }
    </style>
</head>
<body>
    <div class="table">
        <ul class="nav">
            <li class="active">账号登陆</li>
            <li>扫码登陆</li>
        </ul>
        <div class="content">
            <div class="account">
                <form>
                    <p><input type="text" placeholder="请输入用户名"></p>
                    <p><input type="text" placeholder="请输入密码"></p>
                    <p><input type="submit" value="登录"></p>
                </form>
            </div>
            <div class="saoma">
                <img src="images/erweima.png" alt="">
            </div>
        </div>
    </div>
    <script>
        $("li").click(function(){
            $(this).addClass("active").siblings().removeClass("active")

            $(".content>div").eq($(this).index()).show(300).siblings().hide(300)
        })
    </script>
</body>
</html>